package org.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.example.aspect.TimeRecord;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RequestMapping("/test")
@RestController
public class TestController {
    @TimeRecord
    @RequestMapping("/t1")
    public String test1(){
        log.info("test1方法");
        //int a=10/0;
        return "test1";
    }
    @RequestMapping("/t2")
    public String test2(){
        log.info("test2方法");
        return "test2";
    }
}
